package dao.impl;

import dao.ITicketDao;
import entity.Ticket;
import util.FileUtil;
import java.util.List;

public class TicketDaoImpl implements ITicketDao {
    private static final String FILE = "tickets.dat";

    @Override
    public void save(List<Ticket> tickets) {
        FileUtil.writeList(tickets, FILE);
    }

    @Override
    public List<Ticket> load() {
        return FileUtil.readList(FILE);
    }
}